package com.example.config;

/**
 * @program: manage
 * @description: kzc
 * @author: lydms
 * @create: 2023-03-06 15:31
 **/
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;

import java.time.LocalDateTime;



/**
 * cow-core
 * 全局时间处理
 *
 * @author : axian
 * @date : 2022-05-26 20:29
 **/
public class MyMetaObjectHandler implements MetaObjectHandler {

    @Override
    public void insertFill(MetaObject metaObject) {
        this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
    }

    @Override
    public void updateFill(MetaObject metaObject) {
        this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
    }
}